<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let arr = ['张三', '李四', '王五']
    arr = []
    let it = arr[Symbol.iterator]()
    console.log(it);
    // let obj = it.next()
    // console.log(obj.value, obj.done);
    // obj = it.next()
    // console.log(obj.value, obj.done);
    // obj = it.next()
    // console.log(obj.value, obj.done);
    // obj = it.next()
    // console.log(obj.value, obj.done);

    let obj = it.next();
    while (!obj.done) {
      console.log(obj.value);
      obj = it.next();
    }

    // let obj = it.next();
    // do {
    //   console.log(obj.value);
    //   obj = it.next();

    // } while (!obj.done)


  </script>
</body>

</html>